package com.cosmo.integration.service;

import java.util.List;

import org.joda.time.DateTime;

import com.cosmo.integration.web.HttpResponseResult;

public interface AtomService {

	public HttpResponseResult getWorkspaces(String username);
	public HttpResponseResult getSubscriptions(String username);
	public HttpResponseResult getPreferences(String username);

	public HttpResponseResult getDetailsForCollection(String collectionId);
	public HttpResponseResult getDashboardForCollection(String collectionId);

	public HttpResponseResult createCollection(String username, String name, String collectionId);
	public HttpResponseResult updateCollection(String name, String collectionId);
	public HttpResponseResult deleteCollection(String collectionId);

	public HttpResponseResult getEventsInPeriod(String collectionId, DateTime start, DateTime end);

	// these can be called from both sides of the integration
	public HttpResponseResult createEvent(String collectionId, String jsonEvent, boolean fromCosmo);
	public HttpResponseResult addEvent(String collectionId, String itemId, boolean fromCosmo);	
	public HttpResponseResult getEvent(String itemId, boolean fromCosmo);
	public HttpResponseResult updateEvent(String itemId, String jsonEvent, boolean fromCosmo);
	public HttpResponseResult deleteEvent(String collection, String uuid, boolean fromCosmo);
	public HttpResponseResult getExpandedEventInPeriod(String itemId, DateTime start, DateTime end);

	// TESTING
	public List<String> getHomeCollectionIds(String username);

}
